import requests
import json
from pyquery import PyQuery as jq

url = "https://s.taobao.com/search?data-key=s%2Cps&data-value=0%2C1&ajax=true&_ksTS=1540369144296_1020&callback=jsonp1021&q=%E5%9F%83%E7%B4%A2&imgfile=&js=1&stats_click=search_radio_all%3A1&initiative_id=staobaoz_20181024&ie=utf8&bcoffset=4&p4ppushleft=2%2C48&s=44&ntoffset=4"
data = ""
headers = json.loads(r'''{
    "accept": "*/*",
    "accept-encoding": "gzip, deflate, br",
    "accept-language": "zh-CN,zh;q=0.9",
    "cookie": "t=963d9f804d0ffd7121ff60a306cb4aab; thw=cn; cna=bjDPE0fA3QsCASQYmJOVja3w; tracknick=%5Cu5929%5Cu7A7A%5Cu706C%5Cu6728%5Cu5076; tg=0; enc=BaK4KCwZTbbVrAfV2P0YT863y0hfigyPiHrHPreClC9eUsROAuyKVVWs6bAzvsmr0NMUCbteAJKm%2B1X23D7dDw%3D%3D; hng=CN%7Czh-CN%7CCNY%7C156; miid=923644062610054025; lgc=%5Cu5929%5Cu7A7A%5Cu706C%5Cu6728%5Cu5076; x=e%3D1%26p%3D*%26s%3D0%26c%3D0%26f%3D0%26g%3D0%26t%3D0%26__ll%3D-1%26_ato%3D0; mt=ci=1_1&np=; uc3=vt3=F8dByRmq%2BCE5u4ReY%2Bc%3D&id2=UoTbmE0uqbxl9A%3D%3D&nk2=r7lZALrMHYHmsg%3D%3D&lg2=UIHiLt3xD8xYTw%3D%3D; _cc_=VT5L2FSpdA%3D%3D; v=0; cookie2=5c43347d63cc8459eb04421373de69a2; _tb_token_=7b1eb81380e30; alitrackid=www.taobao.com; lastalitrackid=www.taobao.com; swfstore=208007; uc1=cookie14=UoTYNkT0N%2BnyuA%3D%3D; JSESSIONID=F1A983DF911C8C09B2309CBE115E61D8; isg=BCYmiGmSQWFGQxVdAkXdAhYYd5xor2i7ymjM5hDOy8lrk8WteJck0A8l78-6IGLZ",
    "referer": "https://s.taobao.com/search?q=%E5%9F%83%E7%B4%A2&imgfile=&js=1&stats_click=search_radio_all%3A1&initiative_id=staobaoz_20181024&ie=utf8&bcoffset=4&p4ppushleft=2%2C48&s=44&ntoffset=4",
    "user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
}''')

resp = requests.get(url, data=data, headers=headers)

with open('asd1.json','w',encoding='utf8') as f:
	f.write(resp.text)